3.27 \(\int \csc ^6(e+f x) (a+b \sec ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=103 \[ -\frac{\left (a^2+6 a b+6 b^2\right ) \cot (e+f x)}{f}+\frac{2 b (a+2 b) \tan (e+f x)}{f}-\frac{(a+b)^2 \cot ^5(e+f x)}{5 f}-\frac{2 (a+b) (a+2 b) \cot ^3(e+f x)}{3 f}+\frac{b^2 \tan ^3(e+f x)}{3 f} \]

[Out]

-(((a^2 + 6*a*b + 6*b^2)*Cot[e + f*x])/f) - (2*(a + b)*(a + 2*b)*Cot[e + f*x]^3)/(3*f) - ((a + b)^2*Cot[e + f*
x]^5)/(5*f) + (2*b*(a + 2*b)*Tan[e + f*x])/f + (b^2*Tan[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0968982, antiderivative size = 103, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {4132, 448} \[ -\frac{\left (a^2+6 a b+6 b^2\right ) \cot (e+f x)}{f}+\frac{2 b (a+2 b) \tan (e+f x)}{f}-\frac{(a+b)^2 \cot ^5(e+f x)}{5 f}-\frac{2 (a+b) (a+2 b) \cot ^3(e+f x)}{3 f}+\frac{b^2 \tan ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^6*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

-(((a^2 + 6*a*b + 6*b^2)*Cot[e + f*x])/f) - (2*(a + b)*(a + 2*b)*Cot[e + f*x]^3)/(3*f) - ((a + b)^2*Cot[e + f*
x]^5)/(5*f) + (2*b*(a + 2*b)*Tan[e + f*x])/f + (b^2*Tan[e + f*x]^3)/(3*f)

Rule 4132

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_), x_Symbol] :> With[{ff = Fr
eeFactors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p)/(
1 + ff^2*x^2)^(m/2 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && Integer
Q[n/2]

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

\begin{align*} \int \csc ^6(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^2 \left (a+b+b x^2\right )^2}{x^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (2 b (a+2 b)+\frac{(a+b)^2}{x^6}+\frac{2 (a+b) (a+2 b)}{x^4}+\frac{a^2+6 a b+6 b^2}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{\left (a^2+6 a b+6 b^2\right ) \cot (e+f x)}{f}-\frac{2 (a+b) (a+2 b) \cot ^3(e+f x)}{3 f}-\frac{(a+b)^2 \cot ^5(e+f x)}{5 f}+\frac{2 b (a+2 b) \tan (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [B]  time = 1.77154, size = 353, normalized size = 3.43 \[ -\frac{\csc (e) \sec (e) \csc ^5(e+f x) \sec ^3(e+f x) \left (-32 \left (2 a^2+9 a b+12 b^2\right ) \sin (2 f x)-24 a^2 \sin (2 (e+f x))+8 a^2 \sin (4 (e+f x))+8 a^2 \sin (6 (e+f x))-4 a^2 \sin (8 (e+f x))+8 a^2 \sin (2 (e+2 f x))+40 a^2 \sin (4 e+2 f x)+8 a^2 \sin (4 e+6 f x)-4 a^2 \sin (6 e+8 f x)-108 a b \sin (2 (e+f x))+36 a b \sin (4 (e+f x))+36 a b \sin (6 (e+f x))-18 a b \sin (8 (e+f x))+96 a b \sin (2 (e+2 f x))+96 a b \sin (4 e+6 f x)-48 a b \sin (6 e+8 f x)+20 a (5 a+12 b) \sin (2 e)-54 b^2 \sin (2 (e+f x))+18 b^2 \sin (4 (e+f x))+18 b^2 \sin (6 (e+f x))-9 b^2 \sin (8 (e+f x))+128 b^2 \sin (2 (e+2 f x))+128 b^2 \sin (4 e+6 f x)-64 b^2 \sin (6 e+8 f x)\right )}{1920 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^6*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

-(Csc[e]*Csc[e + f*x]^5*Sec[e]*Sec[e + f*x]^3*(20*a*(5*a + 12*b)*Sin[2*e] - 32*(2*a^2 + 9*a*b + 12*b^2)*Sin[2*
f*x] - 24*a^2*Sin[2*(e + f*x)] - 108*a*b*Sin[2*(e + f*x)] - 54*b^2*Sin[2*(e + f*x)] + 8*a^2*Sin[4*(e + f*x)] +
 36*a*b*Sin[4*(e + f*x)] + 18*b^2*Sin[4*(e + f*x)] + 8*a^2*Sin[6*(e + f*x)] + 36*a*b*Sin[6*(e + f*x)] + 18*b^2
*Sin[6*(e + f*x)] - 4*a^2*Sin[8*(e + f*x)] - 18*a*b*Sin[8*(e + f*x)] - 9*b^2*Sin[8*(e + f*x)] + 8*a^2*Sin[2*(e
 + 2*f*x)] + 96*a*b*Sin[2*(e + 2*f*x)] + 128*b^2*Sin[2*(e + 2*f*x)] + 40*a^2*Sin[4*e + 2*f*x] + 8*a^2*Sin[4*e
+ 6*f*x] + 96*a*b*Sin[4*e + 6*f*x] + 128*b^2*Sin[4*e + 6*f*x] - 4*a^2*Sin[6*e + 8*f*x] - 48*a*b*Sin[6*e + 8*f*
x] - 64*b^2*Sin[6*e + 8*f*x]))/(1920*f)

________________________________________________________________________________________

Maple [A]  time = 0.061, size = 190, normalized size = 1.8 \begin{align*}{\frac{1}{f} \left ({a}^{2} \left ( -{\frac{8}{15}}-{\frac{ \left ( \csc \left ( fx+e \right ) \right ) ^{4}}{5}}-{\frac{4\, \left ( \csc \left ( fx+e \right ) \right ) ^{2}}{15}} \right ) \cot \left ( fx+e \right ) +2\,ab \left ( -1/5\,{\frac{1}{ \left ( \sin \left ( fx+e \right ) \right ) ^{5}\cos \left ( fx+e \right ) }}-2/5\,{\frac{1}{ \left ( \sin \left ( fx+e \right ) \right ) ^{3}\cos \left ( fx+e \right ) }}+8/5\,{\frac{1}{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }}-{\frac{16\,\cot \left ( fx+e \right ) }{5}} \right ) +{b}^{2} \left ( -{\frac{1}{5\, \left ( \sin \left ( fx+e \right ) \right ) ^{5} \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}+{\frac{8}{15\, \left ( \sin \left ( fx+e \right ) \right ) ^{3} \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}-{\frac{16}{15\, \left ( \sin \left ( fx+e \right ) \right ) ^{3}\cos \left ( fx+e \right ) }}+{\frac{64}{15\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }}-{\frac{128\,\cot \left ( fx+e \right ) }{15}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^6*(a+b*sec(f*x+e)^2)^2,x)

[Out]

1/f*(a^2*(-8/15-1/5*csc(f*x+e)^4-4/15*csc(f*x+e)^2)*cot(f*x+e)+2*a*b*(-1/5/sin(f*x+e)^5/cos(f*x+e)-2/5/sin(f*x
+e)^3/cos(f*x+e)+8/5/sin(f*x+e)/cos(f*x+e)-16/5*cot(f*x+e))+b^2*(-1/5/sin(f*x+e)^5/cos(f*x+e)^3+8/15/sin(f*x+e
)^3/cos(f*x+e)^3-16/15/sin(f*x+e)^3/cos(f*x+e)+64/15/sin(f*x+e)/cos(f*x+e)-128/15*cot(f*x+e)))

________________________________________________________________________________________

Maxima [A]  time = 0.999698, size = 144, normalized size = 1.4 \begin{align*} \frac{5 \, b^{2} \tan \left (f x + e\right )^{3} + 30 \,{\left (a b + 2 \, b^{2}\right )} \tan \left (f x + e\right ) - \frac{15 \,{\left (a^{2} + 6 \, a b + 6 \, b^{2}\right )} \tan \left (f x + e\right )^{4} + 10 \,{\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \tan \left (f x + e\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{\tan \left (f x + e\right )^{5}}}{15 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/15*(5*b^2*tan(f*x + e)^3 + 30*(a*b + 2*b^2)*tan(f*x + e) - (15*(a^2 + 6*a*b + 6*b^2)*tan(f*x + e)^4 + 10*(a^
2 + 3*a*b + 2*b^2)*tan(f*x + e)^2 + 3*a^2 + 6*a*b + 3*b^2)/tan(f*x + e)^5)/f

________________________________________________________________________________________

Fricas [A]  time = 0.497218, size = 346, normalized size = 3.36 \begin{align*} -\frac{8 \,{\left (a^{2} + 12 \, a b + 16 \, b^{2}\right )} \cos \left (f x + e\right )^{8} - 20 \,{\left (a^{2} + 12 \, a b + 16 \, b^{2}\right )} \cos \left (f x + e\right )^{6} + 15 \,{\left (a^{2} + 12 \, a b + 16 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 10 \,{\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 5 \, b^{2}}{15 \,{\left (f \cos \left (f x + e\right )^{7} - 2 \, f \cos \left (f x + e\right )^{5} + f \cos \left (f x + e\right )^{3}\right )} \sin \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

-1/15*(8*(a^2 + 12*a*b + 16*b^2)*cos(f*x + e)^8 - 20*(a^2 + 12*a*b + 16*b^2)*cos(f*x + e)^6 + 15*(a^2 + 12*a*b
 + 16*b^2)*cos(f*x + e)^4 - 10*(3*a*b + 4*b^2)*cos(f*x + e)^2 - 5*b^2)/((f*cos(f*x + e)^7 - 2*f*cos(f*x + e)^5
 + f*cos(f*x + e)^3)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**6*(a+b*sec(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.16885, size = 204, normalized size = 1.98 \begin{align*} \frac{5 \, b^{2} \tan \left (f x + e\right )^{3} + 30 \, a b \tan \left (f x + e\right ) + 60 \, b^{2} \tan \left (f x + e\right ) - \frac{15 \, a^{2} \tan \left (f x + e\right )^{4} + 90 \, a b \tan \left (f x + e\right )^{4} + 90 \, b^{2} \tan \left (f x + e\right )^{4} + 10 \, a^{2} \tan \left (f x + e\right )^{2} + 30 \, a b \tan \left (f x + e\right )^{2} + 20 \, b^{2} \tan \left (f x + e\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{\tan \left (f x + e\right )^{5}}}{15 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/15*(5*b^2*tan(f*x + e)^3 + 30*a*b*tan(f*x + e) + 60*b^2*tan(f*x + e) - (15*a^2*tan(f*x + e)^4 + 90*a*b*tan(f
*x + e)^4 + 90*b^2*tan(f*x + e)^4 + 10*a^2*tan(f*x + e)^2 + 30*a*b*tan(f*x + e)^2 + 20*b^2*tan(f*x + e)^2 + 3*
a^2 + 6*a*b + 3*b^2)/tan(f*x + e)^5)/f